<!-- 提示信息 -->
<app-tip [type]="tipType"></app-tip>
<div class="header">
  <div class="left flex" [routerLink]="['/main/set']"  id="btn-back">
    <div class="left-icon">
        <i class="fa fa-angle-left back-icon" aria-hidden="true"></i>
    </div>
    <div class="left-name">
      <span class="back-name">返回</span>
    </div>
  </div>
  <div class="center">个人下单统计</div>
</div>

<div class="main">
  <div class="search-box">
    <div class="search flex">
      <div class="start">开始时间：</div>
      <div class="input">
        <input type="date" class="search-input" [(ngModel)]="params.startTime"  id="start-time" value="">
      </div>
      <div class="text">
        <span class="clear-data" (click)="clearData()">清除</span>
      </div>
    </div>
    <div style="padding: 0;">&nbsp;</div>
    <div class="search flex" style="padding-bottom: .7em">
      <div class="start"> 结束时间：</div>
      <div class="input">
        <input type="date" class="search-input" [(ngModel)]="params.endTime">
      </div>
      <div class="text">
        <span class="search-btn" (click)="getData(true)">搜索</span>
      </div>
    </div>
  </div>

  <div class="record-list" *ngIf="list.length">
    <div class="record-item flex">
      <div class="record-item-name">名称</div>
      <div class="record-item-price">价格</div>
      <div class="record-item-num">数量</div>
    </div>
    <div class="record-item flex" *ngFor="let v of list">
      <div class="record-item-name">{{v.food_name}}</div>
      <div class="record-item-price">￥{{v.price}}</div>
      <div class="record-item-num">{{v.num}}</div>
    </div>
  </div>

  <div class="load-data" *ngIf="loading">
    <p class="load-data-icon">
      <i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
    </p>
    <p class="load-data-text">
      数据加载中
    </p>
  </div>

  <div class="load-more" *ngIf="totalPage > params.start" (click)="loadMore()">
    <i class="fa fa-spinner fa-spin fa-fw"></i> <span>点击加载更多...</span>
  </div>
</div>
<div class="no-data" *ngIf="!list.length && isFlag">
  <p class="load-data-description">
    <i class="fa fa-info-circle"></i> <span>暂无统计数据</span>
  </p>
</div>
